package com.amat0urheu.util;



//import org.jclouds.ContextBuilder;
//import org.jclouds.compute.ComputeService;
//import org.jclouds.compute.ComputeServiceContext;
//import org.jclouds.compute.domain.ComputeMetadata;
//
//
//import com.google.common.collect.ImmutableSet;
//import com.google.inject.Module;

import java.io.Closeable;

public class TestUtils {
  /*  private ComputeService compute;
    private RestContext nova;

    public static void main(String[] args) {
        jcloudsOpenStack jcloudOpenStack = new jcloudsOpenStack();

        try {
            jcloudOpenStack.init();
            jcloudOpenStack.listServers();
            jcloudOpenStack.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        finally {
            jcloudOpenStack.close();
        }
    }

    private void init() {
        Iterable modules = ImmutableSet. of(new SLF4JLoggingModule());

        String provider = "openstack-nova";
        String identity = "...";   // login name
        String password = "...";   // password

        ComputeServiceContext context = ContextBuilder.newBuilder(provider)
                .endpoint("https://UltiCloud.com:5000/v2.0/")
                .credentials(identity, password)
                .modules(modules)
                .buildView(ComputeServiceContext.class);
        compute = context.getComputeService();
        nova = context.unwrap();
    }

    private void listServers() {
        Set<? extends ComputeMetadata> nodes = compute.listNodes();
        System.out.println(nodes.size());
    }

    public void close() {
        closeQuietly(compute.getContext());
    }*/
}